import BaseEndpoint from '../../Base/endpoint'
import CreateIntNode from './CreateIntNode'
import { v4 as uuidv4 } from 'uuid'

class CreateDoubleNode extends CreateIntNode {
  [x: string]: any
  constructor(opts) {
    opts.nodeType = 'CREATE_DOUBLE'
    opts.text = '变量浮点数'
    //设置连接点
    opts.endpoints = opts.endpoints || [
      {
        id: uuidv4(),
        type: 'source',
        scope: 'entity',
        pointType: 'output',
        dataKey: 'entity',
        orientation: [1, 0],
        pos: [1, 0.31],
        title: '输出值（实体）',
        Class: BaseEndpoint
      },
      {
        id: uuidv4(),
        type: 'source',
        pointType: 'output',
        scope: 'double',
        dataKey: 'double',
        orientation: [1, 0],
        pos: [1, 0.4],
        title: '输出值（浮点数）',
        Class: BaseEndpoint
      }
    ]
    super(opts)
  }
}
export default CreateDoubleNode
